package org.xlx.xlx_oa.meet.api;

import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.xlx.xlx_oa.common.PageVo;
import org.xlx.xlx_oa.common.ResponseBean;
import org.xlx.xlx_oa.meet.domain.dto.MeetApplyDto;
import org.xlx.xlx_oa.meet.domain.dto.MeetRoomArrangeDto;
import org.xlx.xlx_oa.meet.domain.vo.MeetApplyVo;
import org.xlx.xlx_oa.role_user.domain.dto.AdmProcessDto;
import org.xlx.xlx_oa.role_user.domain.vo.AuditVo;

import java.util.List;

@ApiImplicitParams(value = {
        @ApiImplicitParam(name = "x-request-id", value = "${clientTraceId}",
                paramType = "header", dataType = "String", dataTypeClass = String.class),
        @ApiImplicitParam(name = "Authorization", value = "${BearerToken}",
                paramType = "header", dataType = "String", dataTypeClass = String.class, required = false)
})
@ApiResponses(value = {
        @ApiResponse(code = 400, message = "Bad Request"),
        @ApiResponse(code = 401, message = "Authentication Error"),
        @ApiResponse(code = 403, message = "Authorization Error"),
        @ApiResponse(code = 500, message = "Internal Server Error"),
        @ApiResponse(code = 503, message = "Service Unavailable")
})
public interface MeetApplyApi {
    @PostMapping("/saveApply")
    ResponseBean saveAttendanceApply(MeetApplyVo applyVo);

    @PostMapping("/audit")
    ResponseBean<Boolean> auditApply(@RequestBody AuditVo auditVo);

    @PostMapping("/beAuditList")
    ResponseBean<List<MeetApplyDto>> getBeAuditPage(@RequestBody PageVo pageVo);

    @PostMapping("/appliedList")
    ResponseBean<List<MeetApplyDto>> getAppliedPage(@RequestBody MeetApplyVo applyVo);

    @GetMapping("/detail/{applyId}")
    ResponseBean<List<AdmProcessDto>> getApplyDetail(@PathVariable(value = "applyId") Long applyId);

    @GetMapping("/arrange/{roomId}")
    ResponseBean<List<MeetRoomArrangeDto>> getRoomArrange(@PathVariable(value = "roomId") Long roomId);
}
